/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#ifndef __LIB3D_HARD_TEXTURE_H__
#define __LIB3D_HARD_TEXTURE_H__

#include <pictureformat/PictureFormat.h>
#include "TextureBase.h"

namespace liba
{
namespace lib3d
{
namespace hard
{

class Texture : public TextureBase
{
protected:
	bool wrap;
	bool filtered;
public:
	Texture(int mipmap_levels, const pictureformat::Format & hardware_format, int width, int height):
		TextureBase(mipmap_levels, hardware_format, width, height),
		wrap(true), filtered(true)
	{}
	virtual ~Texture()
	{}
//	virtual void recreate(int mipmap_levels, const pictureformat::Format & pf)
	/** Can return 0 to indicate this mipmap level is to be skipped*/
	virtual void * lock(int mipmap_level, int * stride)=0;
	virtual void unlock(int mipmap_level)=0;
	virtual void set_wrap(bool wrap) {this->wrap = wrap;}
	virtual void set_filtered(bool filtered) {this->filtered = filtered;}
};


} // namespace hard
} // namespace lib3d
} // namespace liba
using namespace liba;

#endif //__LIB3D_HARD_TEXTURE_H__